TELCORE-102: Add Unified Plan BUNDLE RTP receive demux - #620
Conversation
Code Review — PR #620 (BUNDLE / Unified Plan)Verdict: Reviewed 💬 (3 warnings, 0 critical)
Inline comments not available — GitHub API truncates the diff for files >100KB. Reviewed from local bare repo full diff. |
…ent' into linear-telcore-102-unified-plan-bundle
dev-ryanc
left a comment
There was a problem hiding this comment.
1 finding: memory leak in write-frame resample path.
[MEDIUM] switch_core_media.c — resample_tmp memory leak when both write and read resampler overflow in one frame
// switch_core_media.c:21519 — free prior allocation before overwrite:
+ if (resample_tmp) { free(resample_tmp); resample_tmp = NULL; }
switch_malloc(resample_tmp, out_bytes);Both the write resampler (L21132) and read resampler (L21519) overflow paths share the same resample_tmp variable. When both overflow in a single switch_core_session_write_frame call, the read resampler's switch_malloc overwrites the write resampler's allocation without freeing it — a per-frame leak of out_bytes (typically a few KB).
Summary
linear-telcore-102-unified-plan-bundle.No
mod_telnyx_rtcfiles are changed in this PR; signaling-side enablement is handled separately.